package com.woniu.rabbit.work_model.queue_conf;


import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class WorkQueueConfig {
    @Bean
    public Queue workQueue() {
        // durable: true 开启队列持久化。默认false 。rabbitMQ重启仍可恢复消息使用
        return new Queue("work.queue", true);
    }
}
